package com.itheima.stream流;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;

public class Demo3 {
    public static void main(String[] args) {
        String s=new String("123");
        String s1 = s.toString();
        System.out.println(s1);
        System.out.println(s=="123");
        System.out.println(s1.equals("123"));
        System.out.println("================");
        StringBuilder s21=new StringBuilder("123");
        StringBuilder s22=new StringBuilder("123");
        StringBuilder s23=new StringBuilder("123");
        System.out.println(s21.equals("123"));
        System.out.println(s22.equals(s21));
        System.out.println(s21.toString());
        //System.out.println(s23.equals("123"));
        System.out.println(Arrays.toString(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}));;

    }
}

class Text1{
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<String>();
        list.add("aaa");
        list.add("bbb");
        list.add("ccc");
        list.add("ggg");
        Iterator<String> iterator = list.iterator();
        while (iterator.hasNext()) {
            String next = iterator.next();
            if("ggg".equals(next)){
                list.remove("ggg");
            }
            //list.add("qqq");
        }
        System.out.println(list);
    }
}